<script setup lang="ts">
function handleClickLeft() {
  uni.navigateBack()
}
function toAdd() {
  uni.navigateTo({
    url: '/pages/employeeAccount/addAccount',
  })
}
</script>

<template>
  <view class="h-full flex flex-col overflow-hidden">
    <wd-navbar title="员工账号" left-text="返回" left-arrow @click-left="handleClickLeft" />
    <wd-search placeholder="搜索员工账号" hide-cancel placeholder-left />
    <scroll-view class="box-border flex-1 overflow-hidden" scroll-y :show-scrollbar="false">
      <wd-cell-group border>
        <wd-cell is-link class="rounded-lg" center title-width="60%">
          <template #icon>
            <wd-img
              class="mr-4"
              round
              src="https://img2.baidu.com/it/u=1090452517,2487311686&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1732208400&t=067d58f87ab3c92ef8f823f6eaaeb7a8"
              width="52px"
              height="52px"
            />
          </template>
          <template #title>
            <view class="flex items-center">
              <wd-text text="张强" color="#333" size="14px" />
              <view class="i-carbon-user-avatar-filled ml-1 text-sm text-primary" />
            </view>
          </template>
          <template #label>
            <view>
              <wd-tag>管理员</wd-tag>
              <wd-text text="在2个机构下" size="12px" class="ml-1" />
            </view>
            <wd-text text="15900001111" size="12px" />
          </template>
        </wd-cell>
        <wd-cell is-link class="rounded-lg" center title-width="60%">
          <template #icon>
            <wd-img
              class="mr-4"
              round
              src="https://img2.baidu.com/it/u=1090452517,2487311686&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1732208400&t=067d58f87ab3c92ef8f823f6eaaeb7a8"
              width="52px"
              height="52px"
            />
          </template>
          <template #title>
            <view class="flex items-center">
              <wd-text text="李四" color="#333" size="14px" />
            </view>
          </template>
          <template #label>
            <view>
              <wd-tag type="primary" bg-color="#EC7F8C">2个角色</wd-tag>
              <wd-text text="川妹子烤鱼" size="12px" class="ml-1" />
            </view>
            <wd-text text="15900001111" size="12px" />
          </template>
        </wd-cell>
      </wd-cell-group>
    </scroll-view>
    <view class="flex border-t-1 border-border border-t-solid bg-white p-4">
      <wd-button type="primary" :round="false" class="flex-1" @click="toAdd">
        添加员工账号
      </wd-button>
    </view>
  </view>
</template>

<style scoped lang="scss"></style>
